<template>
  <div class="home">
    <div class="header">
      <Header @meshEdit="meshEdit" />
    </div>
    <div class="content">
      <div class="content-left">
        <SideBar />
      </div>
      <div class="content-right">
        <EditorComp />
      </div>
      <Mesh2DComp />
    </div>
    <div v-if="active" class="right">
      <EditComp></EditComp>
    </div>
    <CodeEditorComp></CodeEditorComp>
  </div>
</template>

<script lang="ts" setup>
import Header from "@/UI/components/HeaderComp.vue";
import SideBar from "@/UI/components/SideBarComp.vue";
import EditorComp from "@/UI/components/EditorComp.vue";
import Mesh2DComp from "@/UI/components/Mesh2DComp.vue";
import EditComp from "@/UI/components/rightMeshEditComp.vue";
import CodeEditorComp from "../components/CodeEditor/CodeEditor.vue";
import { ref } from "vue";
const active = ref(false);
function meshEdit(isEditing: boolean) {
  active.value = isEditing;
}
</script>
<style lang="less" scoped>
.home {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #e9ecef;
  .header {
    width: 100%;
    height: 48px;
    margin-bottom: 8px;
    background-color: white;
  }
  .content {
    flex: 1;
    width: 100%;
    display: flex;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    .content-left {
      width: 360px;
      height: 100%;
      margin-left: 8px;
    }
    .content-right {
      flex: 1;
      height: 100%;
    }
  }
  .right {
    width: 100px;
    // height: 400px;
    position: fixed;
    right: 10px;
    top: 200px;
    background-color: #ffffff;
    padding: 10px;
  }
}
</style>
